'use strict';

var _express = require('express');

var _express2 = _interopRequireDefault(_express);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var router = _express2.default.Router();
/**
 * 重定向页面
 * @param  {[type]} '*'   [description]
 * @param  {[type]} (req, res,          next [description]
 * @return {[type]}       [description]
 */
router.get('*.html', function (req, res, next) {
    var renderPath = req.path.substr(1);
    return res.render(renderPath);
});

router.get('/', function (req, res, next) {
    return res.redirect("/index.html");
});

module.exports = router;